<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 常量定义必须赋值, 常量定义好后不能修改
    // const PI = 3.14;
    // PI = 5;
    // console.log(PI);

    const person = {
      name: '张三',
      age: 18
    }
    // person = { name: '王五', age: 20 };
    // console.log(person);
    person.name = '王五';
    console.log(person);

    // 结论: 大厂中定义复杂的数据类型, 都是用const
  </script>
</body>

</html>